#ifndef CAFFEINE_COMPONENTS_KINETICSCOMPONENT_HPP
#define CAFFEINE_COMPONENTS_KINETICSCOMPONENT_HPP

#include "Components/ICompositor.hpp"
#include "Components/IComponent.hpp"
#include "Components/Message.hpp"
#include "Math/Vector.hpp"

namespace Components
{
	class KineticsComponent : public IComponent
	{
	public:
		KineticsComponent( ICompositor &comp );
		virtual ~KineticsComponent( void );

		virtual void Update( void );

		void SetAngle( const float setAng );
		float GetAngle( void ) const;

		void SetPosition( const Math::Vectorf &setPos );
		Math::Vectorf GetPosition( void ) const;

		void SetAngularVelocity( const float setAngVel );
		float GetAngularVelocity( void ) const;

		void SetLinearVelocity( const Math::Vectorf &setVel );
		Math::Vectorf GetLinearVelocity( void ) const;
	private:
		ICompositor &compositor;
		bool dirty;

		Math::Vectorf pos;
		float ang;

		Math::Vectorf vel;
		float angVel;
	};
}

#endif //CAFFEINE_COMPONENTS_KINETICSCOMPONENT_HPP